﻿using System;

namespace MessagePack.Decoders
{
	// Token: 0x020000D2 RID: 210
	internal class Ext32 : IExtDecoder
	{
		// Token: 0x0600031B RID: 795 RVA: 0x0000C11A File Offset: 0x0000A51A
		private Ext32()
		{
		}

		// Token: 0x0600031C RID: 796 RVA: 0x0000C124 File Offset: 0x0000A524
		public ExtensionResult Read(byte[] bytes, int offset, out int readSize)
		{
			uint num = (uint)((int)bytes[offset + 1] << 24 | (int)bytes[offset + 2] << 16 | (int)bytes[offset + 3] << 8 | (int)bytes[offset + 4]);
			sbyte typeCode = (sbyte)bytes[offset + 5];
			byte[] array = new byte[num];
			checked
			{
				readSize = (int)num + 6;
				Buffer.BlockCopy(bytes, offset + 6, array, 0, (int)num);
				return new ExtensionResult(typeCode, array);
			}
		}

		// Token: 0x040000EE RID: 238
		internal static readonly IExtDecoder Instance = new Ext32();
	}
}
